<template>
  <div
    v-loading.fullscreen.lock="true"
    element-loading-text="正在进行OAuth2登录..."
    element-loading-background="#2d3a4b"
  ></div>
</template>

<script setup>
import useUserStore from '@/store/modules/user';
const route = useRoute();

function oauth2Login() {
  const orgin = location.href.split('#')[0];
  const redirect = route.query?.redirect || '/';
  useUserStore().login(`${orgin}#${redirect}`);
}
oauth2Login();
</script>

<style lang="scss" scoped></style>
